/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package controller;

import java.io.IOException;
import java.io.Serializable;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpSession;
import com.gesturn2.comercio.Servicio;


/**
 *
 * @author Man
 */
public class ModificarServicioAction extends Action implements Serializable {

    String next = "";
    HttpSession session = null;//request.getSession(true);
    
   

    @Override



    public void run() throws ServletException, IOException {
           
           Servicio clie = new Servicio();
        // Obtener los parametros
           System.out.println(request.getParameter("sw"));
        clie.setCodigo((request.getParameter("sw")));
        

       try{
     	 Servicio serv= model.consultarServicio(clie.getCodigo());
           
         session.setAttribute("servicio",serv);
     	}catch(Exception ex){
     	   throw new ServletException("Error al consultar el Servicio a modificar: "+ex);
	}
         

         
       


    }

}
